package com.example.spring.design.bridge;

/**
 * @author: orange
 * @create: 2023-08-16 15:25
 * @description:
 */
public class Square extends AbstractShape {

    private ShapeColor shapeColor;

    @Override
    public ShapeColor color() {
        return this.shapeColor;
    }

    @Override
    public String shape() {
        return "正方形";
    }

    public void setShapeColor(ShapeColor shapeColor) {
        this.shapeColor = shapeColor;
    }

    @Override
    public String toString() {
        return String.format("[color = %s, shape = %s]\n", color().color(), shape());
    }
}
